/**********************************************************************************

	ran1, gasdev, sortd, indexxd


	Recipes from Numerical Recipes in C

 (C) Copr. 1986-92 Numerical Recipes Software


**********************************************************************************/ 


/**********************************************************************************
   Returns a uniform random deviate between 0.0 and 1.0
**********************************************************************************/
float ran1(long *idum);

/**********************************************************************************
 Sorts an array arr[1..n] into ascending numerical order
**********************************************************************************/
void sortd(unsigned long n, double arr[]);

/*********************************************************************************
 Indexes an array arrin[1..n], i.e., outputs the array indx[1..n] such that
 arrin[indx[j]] is in ascending order for j = 1;2; : : :;N.
 The input quantities n and arrin are not changed.
*********************************************************************************/
void indexxd(int n,double *arrin,int *indx);

/*********************************************************************************
   Returns a normally distributed deviate with zero mean and unit variance
*********************************************************************************/
float gasdev(long *idum);


int sort2(long n, double *A, double *B);
